﻿<Window x:Class="TfsBranchLib2.View.RecentBranchSetPopup"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="300" WindowStartupLocation="CenterOwner" MinWidth="305" MinHeight="300"
        Title="Select branch set" Closed="Window_Closed">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="38" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="4" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <ListBox x:Name="branchSetsList" Grid.Column="0" SelectionChanged="branchSetsList_SelectionChanged"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.Row="0">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Name="precedentViewGrid" Visibility="Visible"
                          Width="{Binding ActualWidth, ElementName=branchSetsList, Mode=OneWay}">
                        <Grid.Background>
                            <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                <GradientStop Color="#4C9E9E9E" Offset="1" />
                                <GradientStop Color="#19FFFFFF" Offset="0" />
                                <GradientStop Color="#4CA6A6A6" Offset="0.105" />
                                <GradientStop Color="#19FFFFFF" Offset="0.904" />
                            </LinearGradientBrush>
                        </Grid.Background>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <TextBlock Name="ago" Grid.Column="0" Text="{Binding Path=BranchSetValue.StringAgo}" />
                        <TextBlock Name="times" Grid.Column="1" Text="{Binding Path=BranchSetValue.StringTimes}" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <GridSplitter Grid.Column="1" Grid.Row="0" Width="4" HorizontalAlignment="Center" VerticalAlignment="Stretch"
                      Background="#FFB7B7B7" ShowsPreview="True" />
        <ListBox x:Name="branchList" Grid.Column="2" Grid.Row="0">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Path=ServerPath}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <StackPanel Grid.Column="0" Grid.ColumnSpan="34" Grid.Row="1" Orientation="Horizontal"
                    HorizontalAlignment="Right">
            <Button Width="75" Height="23" Margin="5" Click="SetSelectedBranches">OK</Button>
            <Button Width="75" Height="23" Margin="5" Click="CancelAndClose">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>